package com.axsoft.train;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class MainActivity extends TabActivity {
	private Intent mFavoritesIntent;
	private Intent mRouteIntent;
	
	
    /**
     * Activity created
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        TabHost tabHost = getTabHost();
        TabHost.TabSpec tabSpec;
        
        mFavoritesIntent = new Intent().setClass(this, FavoritesActivity.class);
        tabSpec = tabHost.newTabSpec("favorites").setIndicator("Favorites").setContent(mFavoritesIntent);
        tabHost.addTab(tabSpec);
        
        mRouteIntent = new Intent().setClass(this, RouteActivity.class);
        tabSpec = tabHost.newTabSpec("route").setIndicator("Route").setContent(mRouteIntent);
        tabHost.addTab(tabSpec);
        
        tabHost.setCurrentTab(1);
    }
}